package com.chj.design.sk;

public class Code02_Template3 {
	public static abstract class AbstractCookingService {
		// 买菜
		protected abstract void shopping();

		// 清洗
		protected abstract void wash();

		// 烹饪
		protected abstract void cooking();

		// 装盘
		protected abstract void dishedUp();

		public final void process() {
			shopping();
			wash();
			cooking();
			dishedUp();
		}
	}

	/**
	 * 徽菜制作大厨
	 */
	public static class HuiCaiChef extends AbstractCookingService {

		@Override
		protected void shopping() {
			System.out.println("买菜：新鲜鱼一条，红辣椒五两");
		}

		@Override
		protected void wash() {
			System.out.println("清洗：红椒洗净切片，鱼头半分");
		}

		@Override
		protected void cooking() {
			System.out.println("烹饪：鱼头水蒸，辣椒过油");
		}

		@Override
		protected void dishedUp() {
			System.out.println("装盘：用长形盘子装盛");
		}
	}

	/**
	 * 川菜制作大厨
	 */
	public static class ChuanCaiChef extends AbstractCookingService {

		@Override
		protected void shopping() {
			System.out.println("买菜：黑猪肉一斤，蒜头5个");
		}

		@Override
		protected void wash() {
			System.out.println("清洗：猪肉洗净，蒜头去皮");
		}

		@Override
		protected void cooking() {
			System.out.println("烹饪：大火翻炒，慢火闷油");
		}

		@Override
		protected void dishedUp() {
			System.out.println("装盘：深碗盛起，热油浇拌");
		}
	}

	public static void main(String[] args) {
		System.out.println("----------川菜制作------------");
		AbstractCookingService chuanCaiService = new ChuanCaiChef();
		chuanCaiService.process();
		System.out.println("-----------徽菜制作-----------");
		AbstractCookingService huiCaiService = new HuiCaiChef();
		huiCaiService.process();
	}
}
